<template>
	<view class="applyEwmHistory">
		<view class="applyEwmHistory-main">
			<view class="applyEwmHistory-main-li applyEwmHistory-main-title">
				<view class="applyEwmHistory-main-li-left">
					申请时间
				</view>
				<view class="applyEwmHistory-main-li-right">
					申请数量
				</view>
			</view>
			<view class="" v-if="list.length > 0">
				<view class="applyEwmHistory-main-li" v-for="(item, index) of list" :key="index">
					<view class="applyEwmHistory-main-li-left">
						{{item.createTime}}
					</view>
					<view class="applyEwmHistory-main-li-right">
						{{item.applyNum}}
					</view>
				</view>
			</view>
			<view class="" v-else style="padding: 100rpx 0rpx;">
				<view class="yPopNone">
					<image class="yPopNoneImg" src="https://www.zzzsyh.com/applets/agent/factory/23.png" mode="">
					</image>
					<view class="yPopNoneTxt">
						暂无申请~
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import allapi from '../api/index.js'
	export default {
		data() {
			return {
				attributeId: '',
				list: []
			}
		},
		onLoad(val) {
			this.attributeId = val.id
		},
		mounted() {
			// 获取二维码申请记录列表
			this.getQrCodeHistoryList()
		},
		methods: {
			// 获取二维码申请记录列表
			getQrCodeHistoryList() {
				uni.request({
					url: allapi.getQrCodeHistoryList,
					data: {
						attributeId: this.attributeId
					},
					success: (res) => {
						console.log(res);
						let dat = res.data.data
						// this.list = dat
					}
				})
			}
		}
	}
</script>

<style scoped>
	.applyEwmHistory {}

	.applyEwmHistory-main {
		margin: 24rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
	}

	.applyEwmHistory-main-li {
		display: flex;
		align-items: center;
		font-size: 28rpx;
		color: #333333;
		height: 88rpx;
		border-bottom: 1rpx solid #EEEEEE;
	}

	.applyEwmHistory-main-li:last-child {
		border: none;
	}

	.applyEwmHistory-main-title {
		color: #999999;
	}

	.applyEwmHistory-main-li-left {
		flex: 1;
		text-align: center;
	}

	.applyEwmHistory-main-li-right {
		flex: 1;
		text-align: center;
	}
</style>
